From 3e66e5bd81be6733df2072c37c84b22898cfbbf9 Mon Sep 17 00:00:00 2001 From: "iap10@labyrinth.cl.cam.ac.uk" Date: Wed, 13 Oct 2004 03:31:02 +0000 Subject: [PATCH] bitkeeper revision 1.1159.1.227 (416ca176osUUBQBGiZS4hIALhIyUsg) Slightly smarter initial CPU placement. --- xen/common/dom0_ops.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/xen/common/dom0_ops.c b/xen/common/dom0_ops.c index 5eb31b736c..829eb1de2e 100644 --- a/xen/common/dom0_ops.c +++ b/xen/common/dom0_ops.c @@ -178,7 +178,29 @@ long do_dom0_op(dom0_op_t *u_dom0_op) break; if ( op->u.createdomain.cpu == -1 ) - pro = (unsigned int)dom % smp_num_cpus; + { + /* Do an initial placement. Fix me for hyperthreading! */ + struct domain *d; + int i, j=0, c[smp_num_cpus]; + + pro=0; /* keep compiler happy */ + + for (i=0;iprocessor]++; + j++; + } + + for (i=0;iu.createdomain.cpu % smp_num_cpus; -- 2.30.2